package com.mall.b2c.domain.delivery;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.PrePersist;
import javax.persistence.Table;

import com.mall.common.domain.BaseEntity;

/**
 * 发货点
 * 
 * @author lzx
 *
 */
@Entity
@Table(name = "b2c_delivery_center")
public class DeliveryCenterDomain extends BaseEntity {

	private static final long serialVersionUID = 4011191592020291583L;
	private String name;// 发货点名称
	private String sender;// 发货点联系人
	private String zipCode;// 邮政编码
	private String mobile;// 手机号码
	private String telephone;// 电话号码
	private String distric;// 地区
	private String address;// 地址
	private String description;// 备注
	private Boolean isDefault;// 是否默认地址
	
	
	@PrePersist
	public void prePersist(){
		if(isDefault == null){
			setIsDefault(false);
		}
	}
	
	@Column(name="area_id")
	private Long areaId;// 地区
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	public String getSender() {
		return sender;
	}

	public void setSender(String sender) {
		this.sender = sender;
	}

	public String getZipCode() {
		return zipCode;
	}

	public void setZipCode(String zipCode) {
		this.zipCode = zipCode;
	}
	
	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getTelephone() {
		return telephone;
	}

	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}
	
	public Boolean getIsDefault() {
		return isDefault;
	}

	public void setIsDefault(Boolean isDefault) {
		this.isDefault = isDefault;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getDistric() {
		return distric;
	}

	public void setDistric(String distric) {
		this.distric = distric;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}
	
	public Long getAreaId() {
		return areaId;
	}

	public void setAreaId(Long areaId) {
		this.areaId = areaId;
	}

}
